{if $is_ajax eq 0}
<div class="list">
	<div class="list_title clearfix">
	<div class="cur"><a href="{url x="index" r="uc_account#mobile"}">{$LANG.UC_MOBILE}</a></div>
</div>
<div class="uc_r_bl_box clearfix">
<div class="blank"></div>
<div class="inc wb">
{/if}
	<div class="inc_main">
		<div class="tip-h clearfix">
			<div class="lh22 f14" style="padding:50px 0 20px 102px;">
				{if $user_info.mobilepassed eq 0}
                <p>尚未绑定手机号</p>
				<div class="blank1"></div>
                <p>若您希望绑定手机号，请输入以下信息：</p>
				{else}
                <p>已绑定手机号：<?php echo preg_replace('#(\d{3})\d{5}(\d{3})#', '${1}*****${2}', $this->_var['user_info']['mobile']);?></p>
                <div class="blank1"></div>
				<p>若您希望重新绑定其他手机号，请输入以下信息：</p>
				{/if}
            </div>
			<form method="post" name="bind_mobile" id="j_bind_mobile">
			<table width="470" border="0" style="margin:0 auto;">
                <tbody>
            	{if $user_info.mobile neq ''}
                <tr>
                    <td width="70">
                        <div align="left" class="f14">原手机：</div>
                    </td>
                    <td>
                        <input id="oldphone" name="old_phone" class="f-input">
                    </td>
                   
                </tr>
				{/if}
                <tr>
                    <td width="70">
                        <div align="left" class="f14">手机号：</div>
                    </td>
                    <td>
                        <input id="J_Vphone" name="phone" class="f-input">
                    </td>
                    <td height="35" colspan="2" class="f_gray">
                        <input type="button" id="reveiveActiveCode" class="reveiveActiveCode" value="{$LANG.DO_SEND}{$LANG.MOBILE_VERIFY_CODE}" onclick="sendPhoneCode(this,'#J_Vphone');">
                    </td>
                </tr>
                <tr>
                    <td>
                        <div align="left" class="f14"> {$LANG.VERIFY_CODE}：</div>
                    </td>
                    <td>
                        <input name="validateCode" id="validateCode" class="f-input">
                    </td>
                    <td class="f_gray f14" style="padding-left:10px; width:200px">请输入您获取的手机验证码</td>
                </tr>
                <tr>
                    <td></td>
                    <td colspan="2">
                        <div style="margin-top:20px;">
                            <input type="submit" name="submit" value="{$LANG.SUBMIT_FORM}" class="sub_btn">
                        </div>
                    </td>
                </tr>
            	</tbody>
			</table>
			</form>
		</div>
	</div>
	{if $is_ajax eq 0}
	<div class="inc_foot"></div>
</div>
</div>
</div>
{/if}

<script type="text/javascript">
	jQuery(function(){
		$("#j_bind_mobile").unbind('submit');
		$("#j_bind_mobile").bind("submit",function(){	
			var query = new Object();
			query.ctl = 'ajax';
			query.act = 'check_verify_code';
			query.mobile = $("#J_Vphone").val();
			query.verify = $("#validateCode").val();
			if($("#oldphone").length > 0){
				query.old_mobile = $("#oldphone").val();
			}
			query.ajax = 1;
			$.ajax({
				url : APP_ROOT+"/index.php",
				data:query,
				type:"post",
				dataType:"json",
				success: function(obj){
					if(obj.status)
					{			
						$.showSuccess(obj.info,function(){
							window.location.reload();
						});
					}
					else
						$.showErr(obj.info);
				},
				error:function(ajaxobj)
				{
					/*if(ajaxobj.responseText!='')
					alert(ajaxobj.responseText);*/
				}
			});
			return false;
		});
	});
	
	
</script>